#include "stdafx.h"
#include "sound_buffer_manager.hpp"

namespace FndGame2D {
    bool sound_buffer_manager::add_sound_buffer(const sound_buffer_manager::key_type& k,
                                                const char* file_name) {
        value_type value = value_type(new sf::SoundBuffer) ;
        if(value->LoadFromFile(file_name)) {
            return m_mgr.add_value(k, value) ;
        } else {
            pantheios::log_DEBUG("load file failed when call add_sound_buffer ", file_name, "\n") ;
            return false ;
        }
    }
}
